home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1990: Discy Business / Discy Business.2mg / DEV.CD / TOOLS / APW.Interfaces / CInclude / Dialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-01  |  6.3 KB  |  193 lines  |  [04] ASCII Text (0x0000)

  1. /********************************************
  2. ; File: Dialog.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9. #ifndef __TYPES__
  10. #include <TYPES.h>
  11. #endif
  12.  
  13. #ifndef __QUICKDRAW__
  14. #include <QUICKDRAW.h>
  15. #endif
  16.  
  17. #ifndef __EVENT__
  18. #include <EVENT.h>
  19. #endif
  20.  
  21. #ifndef __CONTROL__
  22. #include <CONTROL.h>
  23. #endif
  24.  
  25. #ifndef __WINDOW__
  26. #include <WINDOW.h>
  27. #endif
  28.  
  29. #ifndef __LINEEDIT__
  30. #include <LINEEDIT.h>
  31. #endif
  32.  
  33. #ifndef __DIALOG__
  34. #define __DIALOG__
  35.  
  36.  
  37. /* Error Codes */
  38. #define badItemType 0x150A
  39. #define newItemFailed 0x150B
  40. #define itemNotFound 0x150C
  41. #define notModalDialog 0x150D
  42.  
  43. /* Command Codes */
  44. #define getInitView 0x0001
  45. #define getInitTotal 0x0002
  46. #define getInitValue 0x0003
  47. #define scrollLineUp 0x0004
  48. #define scrollLineDown 0x0005
  49. #define scrollPageUp 0x0006
  50. #define scrollPageDown 0x0007
  51. #define scrollThumb 0x0008
  52.  
  53. /* Item Type Codes */
  54. #define buttonItem 0x000A
  55. #define checkItem 0x000B
  56. #define radioItem 0x000C
  57. #define scrollBarItem 0x000D
  58. #define userCtlItem 0x000E
  59. #define statText 0x000F
  60. #define longStatText 0x0010
  61. #define editLine 0x0011
  62. #define userItem 0x0014
  63. #define userCtlItem2 0x0015
  64. #define longStatText2 0x0016
  65. #define itemDisable 0x8000
  66.  
  67. /* Item Type Ranges */
  68. #define minItemType 0x000A
  69. #define maxItemType 0x0016
  70.  
  71. /* ItemID Codes */
  72. #define ok 0x0001
  73. #define cancel 0x0002
  74.  
  75. /* Part Codes */
  76. #define inButton 0x0002
  77. #define inCheckBox 0x0003
  78. #define inRadioButton 0x0004
  79. #define inUpArrow 0x0005
  80. #define inDownArrow 0x0006
  81. #define inPageUp 0x0007
  82. #define inPageDown 0x0008
  83. #define inStatText 0x0009
  84. #define inGrow 0x000A
  85. #define inEditLine 0x000B
  86. #define inUserItem 0x000C
  87. #define inLongStatText 0x000D
  88. #define inIconItem 0x000E
  89. #define inLongStatText2 0x000F
  90. #define inThumb 0x0081
  91.  
  92. /* Stage Bit Vectors */
  93. #define okDefault 0x0000
  94. #define cancelDefault 0x0040
  95. #define alertDrawn 0x0080
  96.  
  97. /* Other Constants */
  98. #ifndef atItemListLength  /* AlertTemplate - Default number of Item Templates */
  99. #define atItemListLength 0x0005
  100. #endif
  101. #ifndef dtItemListLength  /* DialogTemplate - Default number of Item Templates */
  102. #define dtItemListLength 0x0008
  103. #endif
  104. typedef GrafPortPtr DialogPtr;
  105. struct ItemTemplate {
  106.    Word itemID; /*  */
  107.    Rect itemRect; /*  */
  108.    Word itemType; /*  */
  109.    Pointer itemDescr; /*  */
  110.    Word itemValue; /*  */
  111.    Word itemFlag; /*  */
  112.    Pointer itemColor; /* pointer to appropriate type of color table */
  113. } ;
  114. typedef struct ItemTemplate ItemTemplate, *ItemTempPtr, **ItemTempHndl;
  115. struct AlertTemplate {
  116.    Rect atBoundsRect;
  117.    Word atAlertID;
  118.    Byte atStage1;
  119.    Byte atStage2;
  120.    Byte atStage3;
  121.    Byte atStage4;
  122.    ItemTempPtr atItemList[atItemListLength]; /* Null terminated array */
  123. } ;
  124. typedef struct AlertTemplate AlertTemplate, *AlertTempPtr, **AlertTempHndl;
  125. struct DialogTemplate {
  126.    Rect dtBoundsRect;
  127.    Boolean dtVisible;
  128.    Longint dtRefCon;
  129.    ItemTempPtr dtItemList[dtItemListLength]; /* Null terminated array */
  130. } ;
  131. typedef struct DialogTemplate DialogTemplate, *DlgTempPtr, **DlgTempHndl;
  132. struct UserCtlItemPB {
  133.    LongProcPtr defProcParm;
  134.    Pointer titleParm;
  135.    Word param2;
  136.    Word param1;
  137. } ;
  138. typedef struct UserCtlItemPB UserCtlItemPB, *UserCtlItemPBPtr, **UserCtlItemPBHndl;
  139. extern pascal Word Alert() inline(0x1715,dispatcher);
  140. extern pascal Word CautionAlert() inline(0x1A15,dispatcher);
  141. extern pascal void CloseDialog() inline(0x0C15,dispatcher);
  142. extern pascal Boolean DefaultFilter() inline(0x3615,dispatcher);
  143. extern pascal void DialogBootInit() inline(0x0115,dispatcher);
  144. extern pascal void DialogReset() inline(0x0515,dispatcher);
  145. extern pascal Boolean DialogSelect() inline(0x1115,dispatcher);
  146. extern pascal void DialogShutDown() inline(0x0315,dispatcher);
  147. extern pascal void DialogStartUp() inline(0x0215,dispatcher);
  148. extern pascal Boolean DialogStatus() inline(0x0615,dispatcher);
  149. extern pascal Word DialogVersion() inline(0x0415,dispatcher);
  150. extern pascal void DisableDItem() inline(0x3915,dispatcher);
  151. extern pascal void DlgCopy() inline(0x1315,dispatcher);
  152. extern pascal void DlgCut() inline(0x1215,dispatcher);
  153. extern pascal void DlgDelete() inline(0x1515,dispatcher);
  154. extern pascal void DlgPaste() inline(0x1415,dispatcher);
  155. extern pascal void DrawDialog() inline(0x1615,dispatcher);
  156. extern pascal void EnableDItem() inline(0x3A15,dispatcher);
  157. extern pascal void ErrorSound() inline(0x0915,dispatcher);
  158. extern pascal Word FindDItem() inline(0x2415,dispatcher);
  159. extern pascal Word GetAlertStage() inline(0x3415,dispatcher);
  160. extern pascal CtlRecHndl GetControlDItem() inline(0x1E15,dispatcher);
  161. extern pascal Word GetDefButton() inline(0x3715,dispatcher);
  162. extern pascal void GetDItemBox() inline(0x2815,dispatcher);
  163. extern pascal Word GetDItemType() inline(0x2615,dispatcher);
  164. extern pascal Word GetDItemValue() inline(0x2E15,dispatcher);
  165. extern pascal Word GetFirstDItem() inline(0x2A15,dispatcher);
  166. extern pascal void GetIText() inline(0x1F15,dispatcher);
  167. extern pascal void GetNewDItem() inline(0x3315,dispatcher);
  168. extern pascal DialogPtr GetNewModalDialog() inline(0x3215,dispatcher);
  169. extern pascal Word GetNextDItem() inline(0x2B15,dispatcher);
  170. extern pascal void HideDItem() inline(0x2215,dispatcher);
  171. extern pascal Boolean IsDialogEvent() inline(0x1015,dispatcher);
  172. extern pascal Word ModalDialog() inline(0x0F15,dispatcher);
  173. extern pascal LongWord ModalDialog2() inline(0x2C15,dispatcher);
  174. extern pascal void NewDItem() inline(0x0D15,dispatcher);
  175. extern pascal DialogPtr NewModalDialog() inline(0x0A15,dispatcher);
  176. extern pascal DialogPtr NewModelessDialog() inline(0x0B15,dispatcher);
  177. extern pascal Word NoteAlert() inline(0x1915,dispatcher);
  178. extern pascal void ParamText() inline(0x1B15,dispatcher);
  179. extern pascal void RemoveDItem() inline(0x0E15,dispatcher);
  180. extern pascal void ResetAlertStage() inline(0x3515,dispatcher);
  181. extern pascal void SelectIText() inline(0x2115,dispatcher);
  182. extern pascal void SelIText() inline(0x2115,dispatcher);
  183. extern pascal void SetDAFont() inline(0x1C15,dispatcher);
  184. extern pascal void SetDefButton() inline(0x3815,dispatcher);
  185. extern pascal void SetDItemBox() inline(0x2915,dispatcher);
  186. extern pascal void SetDItemType() inline(0x2715,dispatcher);
  187. extern pascal void SetDItemValue() inline(0x2F15,dispatcher);
  188. extern pascal void SetIText() inline(0x2015,dispatcher);
  189. extern pascal void ShowDItem() inline(0x2315,dispatcher);
  190. extern pascal Word StopAlert() inline(0x1815,dispatcher);
  191. extern pascal void UpdateDialog() inline(0x2515,dispatcher);
  192. #endif
  193.